package com.example.demo_spring.aop.rent.pureJava;

public class Landlord {

    public void service() {
        // 仅仅只是实现了核心的业务功能
        try {
            Thread.sleep(500);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("签合同");
        System.out.println("收房租");
    }

    public static void main(String[] args) {
        Landlord l = new Landlord();
        l.service();
    }
}

//public class Landlord {
//
//    public void service() {
//        long startTime = System.currentTimeMillis();
//
//        // 仅仅只是实现了核心的业务功能
//        try {
//            Thread.sleep(500);
//        } catch (InterruptedException e) {
//            e.printStackTrace();
//        }
//        System.out.println("签合同");
//        System.out.println("收房租");
//
//        long endTime = System.currentTimeMillis();
//        long timeCost = endTime - startTime;
//        System.out.printf("[%s.%s] time cost: %d ms\n", "Landlord", "service", timeCost);
//    }
//
//    public static void main(String[] args) {
//        Landlord l = new Landlord();
//        l.service();
//    }
//}
